export function checkErrorStatus(status: number | undefined, message: string | undefined, callback: (errMsg: string) => any) {
    let errorMessage = message ?? ''
    switch (status) {
        case 400:
            errorMessage = '请求格式或参数有误！'
            break
        case 401:
            errorMessage = '身份认证不通过'
            break
        case 403:
            errorMessage = '用户得到授权!'
            break
        case 404:
            errorMessage = '未找到目标资源!'
            break
        case 500:
            errorMessage = '服务器错误!'
            break
        case 503:
            errorMessage = '服务器错误！'
            break
        default:
            errorMessage = '服务器错误！'
            break
    }
    if (errorMessage.length > 0) {
        callback(errorMessage)
    }
}